#ifndef SERVER_H
#define SERVER_H


#include "net_err.h"
#include "stdtypes.h"
#include "nlist.h"

#define CLI_PIPE   "\\\\.\\PIPE\\MINI_NET"

#define NO_RET_MSG "NOMSG\0"
#define NO_RET_LEN 6

#define CLI_MSG_LENGTH 512

// typedef union {
//     uint8_t pipe_msg[512];
//     struct {
//         uint8_t is_end;
//         uint32_t len;
//         uint8_t msg[507];
//     } pip_stru;
// } __attribute__((packed)) PIPEMSG;

net_err_t cli_service_start();
u32 recv_pipe_msg(HANDLE ph, void **msg, u32 *len);
u32 send_pipe_msg(HANDLE ph, int length, void *msg);
#endif
